import java.util.Scanner;

public class Ex2_16{
	public static void main(String[] args){
		Scanner input = new Scanner(System.in);
		System.out.print("Enter the amount of water in kilogram: ");
		double amountOfWater = input.nextDouble();
		System.out.print("Enter the initial temperature: ");
		double initialTemp = input.nextDouble();
		System.out.print("Enter the final temperature: ");
		double finalTemp = input.nextDouble();
		double q = amountOfWater * (finalTemp - initialTemp) * 4184;
		System.out.printf("The energy needed is %e\n", q);
	}
}